home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / BARNET / COMPILER / SATHER / !Sather / Library / IO / IO.sam next >
Text File  |  1996-03-19  |  2KB  |  42 lines

  1. -- Copyright (C) International Computer Science Institute, 1994.  COPYRIGHT  --
  2. -- NOTICE: This code is provided "AS IS" WITHOUT ANY WARRANTY and is subject --
  3. -- to the terms of the SATHER LIBRARY GENERAL PUBLIC LICENSE contained in    --
  4. -- the file "Doc/License" of the Sather distribution.  The license is also   --
  5. -- available from ICSI, 1947 Center St., Suite 600, Berkeley CA 94704, USA.  --
  6. --------> Please email comments to "sather-bugs@icsi.berkeley.edu". <----------
  7.  
  8. (*
  9.  
  10. IO CLASSES
  11.  
  12. The most commonly used IO class in Sather is OUT, as seen in the
  13. hello world program:
  14.  
  15.     #OUT + "Hello world.\n";
  16.  
  17. ERR works the same as OUT except output goes to standard error.
  18.  
  19. IN provides methods for getting input from standard in.  If you
  20. are looking for exotic ways to parse input, take a look at
  21. STR_CURSOR in Strings.  Instead of providing lots of ways to
  22. read in different kinds of values, the Sather idiom is to read
  23. in the whole file in one gulp into memory and parse it there as
  24. a string.  For most purposes this works well.
  25.  
  26. FILE can be used to access files in a Unixish way.  BFILE is an
  27. equivalent for binary files (the difference shows up in portability
  28. issues.)  Both of these will probably be replaced by a more general
  29. and portable file/directory mechanism in the future.
  30.  
  31. *)
  32.  
  33. -- This is a list of library files that can automatically
  34. -- be loaded by a reference in users' SATHER_COMMANDS env variable
  35.  
  36.     err.sa -has err.sa ERR C_ERR
  37.     file.sa -has file.sa FILE BFILE C_FILE
  38.     in.sa -has in.sa IN C_IN
  39.     out.sa -has out.sa OUT C_OUT
  40.     stream.sa -has stream.sa $OSTREAM
  41.     str_stream.sa -has str_stream.sa STR_STREAM
  42.